import { post } from '@/utils/ajax'
const formData = {
    "Content-Type": "multipart/form-data",
}

export function postAction(path,params) {
    return post(path, params);
}
// 查询列表
export function search(query) {
    return post('/uni/element/info/search', query, formData);
}
// 新增
export function insert(params) {
    return post('/uni/element/info/insert', params, formData);
}
// 删除
export function deleteByIds(ids) {
    return post('/uni/element/info/deleteByIds',{ids}, formData);
}
// 根据实体删除
export function deleteByEntry(params) {
    return post('/uni/element/info/deleteByEntry',params, formData);
}
// 更新
export function updateById(params) {
    return post('/uni/element/info/updateRowNotNullById', params, formData);
}
// 根据ID获取
export function selectById(id) {
    return post('/uni/element/info/selectById', { id }, formData);
}
// 根据分类ID获取元素分页列表
export function elementInfoList(query) {
    return post('/uni/element/info/elementInfoList', query, formData);
}
// 根据父分类code查询所属元素列表
export function elementListByParentCategoryCode(query) {
    return post('/uni/element/info/elementListByParentCategoryCode', query, formData);
}
// 元素排序移动
export function elementSort(query) {
    return post('/uni/element/info/elementSort', query, formData);
}

// 查询分类树
export function categoryTreeList(query){
    return post('uni/category/info/getCategoryTree', query, formData);
}
// 查询列表
export function searchAll(query) {
    return post('/uni/entity/info/searchAll', query, formData);
}

// 批量新增
export function insertBatch(insertParam) {
    return post('/uni/category/element/insertBatch', insertParam, formData);
}

// 分类命名空间列表
export function searchCateNameSpace(query) {
    return post('/uni/category/info/searchCateNameSpace', query, formData)
}
